from django.contrib import admin
from .models import User
# Register your models here.
@admin.register(User)
class UserAdmin(admin.ModelAdmin):
    # 要显示的字段信息
    list_display = ['id', 'account', 'username', 'money', 'gender', 'tel']
    # 过滤器 根据性别过滤
    list_filter = ['gender']
    # 搜索
    search_fields = ['account', 'username']